package com.youlai.boot.modules.tp.entity;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 商品销售数据实体
 * 
 * @author xiheforever
 * @since 2025-06-04
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("product_sales")
public class ProductSales {

    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    /**
     * 时间周期
     */
    @TableField("time_period")
    private String timePeriod;

    /**
     * 商品名称
     */
    @TableField("product_name")
    private String productName;

    /**
     * SKU
     */
    @TableField("sku")
    private String sku;

    /**
     * 品牌
     */
    @TableField("brand")
    private String brand;

    /**
     * 一级类别
     */
    @TableField("first_category")
    private String firstCategory;

    /**
     * 二级类别
     */
    @TableField("second_category")
    private String secondCategory;

    /**
     * 三级类别
     */
    @TableField("third_category")
    private String thirdCategory;

    /**
     * 店铺简称
     */
    @TableField("shop_short_name")
    private String shopShortName;

    /**
     * 经营模式
     */
    @TableField("operation_mode")
    private String operationMode;

    /**
     * 浏览量
     */
    @TableField("page_views")
    private Integer pageViews;

    /**
     * 访客数
     */
    @TableField("visitor_count")
    private Integer visitorCount;

    /**
     * 人均浏览量
     */
    @TableField("avg_page_views_per_visitor")
    private BigDecimal avgPageViewsPerVisitor;

    /**
     * 平均停留时长
     */
    @TableField("avg_stay_time")
    private Integer avgStayTime;

    /**
     * 成交人数
     */
    @TableField("transaction_user_count")
    private Integer transactionUserCount;

    /**
     * 成交转化率
     */
    @TableField("conversion_rate")
    private BigDecimal conversionRate;

    /**
     * 成交单量
     */
    @TableField("transaction_order_count")
    private Integer transactionOrderCount;

    /**
     * 成交商品件数
     */
    @TableField("transaction_item_count")
    private Integer transactionItemCount;

    /**
     * 成交金额
     */
    @TableField("transaction_amount")
    private BigDecimal transactionAmount;

    /**
     * 成交客单价
     */
    @TableField("average_transaction_value")
    private BigDecimal averageTransactionValue;

    /**
     * 创建时间
     */
    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 更新时间
     */
    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    /**
     * 删除标记(0:正常 1:删除)
     */
    @TableField("is_deleted")
    @TableLogic
    private Integer isDeleted;
} 